package com.graduation_design.service;

import com.graduation_design.common.dto.AppSkuDto;
import com.graduation_design.entity.AppOrder;
import com.graduation_design.entity.AppOrderItem;
import com.graduation_design.entity.AppSkuStock;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author 从南
* @description 针对表【app_sku_stock】的数据库操作Service
* @createDate 2024-02-16 18:15:59
*/
public interface AppSkuStockService extends IService<AppSkuStock> {

    List<AppSkuStock> listSkuByProductId(Long productId);

    AppSkuStock getSku(Long skuId, Long productId);

    void reduceStock(List<AppOrderItem> orderItems);

    void releaseStock(AppOrder appOrder);

    Object getSkuByProductId(Long productId);

    void saveSku(AppSkuDto appSkuDto);
}
